package com.minimalist.basic.config.request;

/**
 * @author 11987
 */
public class TenantIdContext {
    private static final ThreadLocal<Long> TENANT_ID = new ThreadLocal<>();

    public static void setTenantId(Long userId) {
        TENANT_ID.set(userId);
    }

    public static Long getTenantId() {
        return TENANT_ID.get();
    }

    public static void clear() {
        TENANT_ID.remove();
    }
}
